import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.awt.Image;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.Color;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JButton;
import javax.swing.LayoutStyle.ComponentPlacement;
import java.awt.Font;

public class DisasterView extends JFrame {

	private JPanel contentPane;
	private Image disaster;
	private JLabel disasterLabel;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					DisasterView frame = new DisasterView();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public DisasterView() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		ImageIcon disasterIcon = new ImageIcon("disaster.jpg");
		// disaster = disasterIcon.getImage();
		disasterLabel = new JLabel(
				new ImageIcon(
						"C:\\Users\\Madhuri\\Documents\\3rd year\\CS2340\\M5\\disaster.jpg"));
		contentPane = new JPanel();
		contentPane.setBackground(new Color(0, 0, 139));
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.add(disasterLabel);
		setContentPane(contentPane);

		JButton btnNewButton = new JButton("Continue");

		JLabel lblDisaster = new JLabel("Disaster");
		lblDisaster.setForeground(new Color(0, 191, 255));
		lblDisaster.setFont(new Font("Tahoma", Font.BOLD, 15));
		GroupLayout gl_contentPane = new GroupLayout(contentPane);
		gl_contentPane
				.setHorizontalGroup(gl_contentPane
						.createParallelGroup(Alignment.TRAILING)
						.addGroup(
								gl_contentPane
										.createSequentialGroup()
										.addContainerGap()
										.addGroup(
												gl_contentPane
														.createParallelGroup(
																Alignment.LEADING)
														.addGroup(
																gl_contentPane
																		.createSequentialGroup()
																		.addGroup(
																				gl_contentPane
																						.createParallelGroup(
																								Alignment.LEADING)
																						.addGroup(
																								gl_contentPane
																										.createSequentialGroup()
																										.addGap(
																												4)
																										.addComponent(
																												disasterLabel,
																												GroupLayout.DEFAULT_SIZE,
																												GroupLayout.DEFAULT_SIZE,
																												Short.MAX_VALUE))
																						.addComponent(
																								btnNewButton,
																								Alignment.TRAILING,
																								GroupLayout.PREFERRED_SIZE,
																								101,
																								GroupLayout.PREFERRED_SIZE))
																		.addGap(
																				20))
														.addGroup(
																Alignment.TRAILING,
																gl_contentPane
																		.createSequentialGroup()
																		.addComponent(
																				lblDisaster,
																				GroupLayout.PREFERRED_SIZE,
																				93,
																				GroupLayout.PREFERRED_SIZE)
																		.addGap(
																				153)))));
		gl_contentPane.setVerticalGroup(gl_contentPane.createParallelGroup(
				Alignment.TRAILING).addGroup(
				gl_contentPane.createSequentialGroup().addContainerGap()
						.addComponent(lblDisaster).addGap(1).addComponent(
								disasterLabel, GroupLayout.PREFERRED_SIZE, 196,
								Short.MAX_VALUE).addPreferredGap(
								ComponentPlacement.RELATED).addComponent(
								btnNewButton).addContainerGap()));
		contentPane.setLayout(gl_contentPane);
	}
}
